package com.ruoyi.labdata.mapper;

import java.util.Date;
import java.util.List;
import com.ruoyi.labdata.domain.LabReservation;
import com.ruoyi.wechatapi.domain.QueryEntity;
import org.apache.ibatis.annotations.Param;

/**
 * 实验室预约Mapper接口
 * 
 * @author ruoyi
 * @date 2022-03-27
 */
public interface LabReservationMapper 
{
    /**
     * 查询实验室预约
     * 
     * @param instanceId 实验室预约ID
     * @return 实验室预约
     */
    public LabReservation selectLabReservationById(Long instanceId);

    /**
     * 查询实验室预约列表
     * 
     * @param labReservation 实验室预约
     * @return 实验室预约集合
     */
    public List<LabReservation> selectLabReservationList(LabReservation labReservation);

    /**
     * 新增实验室预约
     * 
     * @param labReservation 实验室预约
     * @return 结果
     */
    public int insertLabReservation(LabReservation labReservation);

    /**
     * 修改实验室预约
     * 
     * @param labReservation 实验室预约
     * @return 结果
     */
    public int updateLabReservation(LabReservation labReservation);

    /**
     * 删除实验室预约
     * 
     * @param instanceId 实验室预约ID
     * @return 结果
     */
    public int deleteLabReservationById(Long instanceId);

    /**
     * 批量删除实验室预约
     * 
     * @param instanceIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteLabReservationByIds(Long[] instanceIds);

    /**
     * 根据实验室id和预约日期查询实验室预约记录
     * @param classRoomId 实验室id
     * @param appointmentTime 预约日期
     * @return
     */
    List<LabReservation> selectLabReservationListByClassRoomIdAndAppointmentTime(@Param("classRoomId") Long classRoomId, @Param("appointmentTime") String appointmentTime);

    List<LabReservation> selectLabReservationListByHolidayDateList(@Param("appointmentTimeList")List<String> appointmentTimeList,@Param("classRoomId")Long classRoomId);
    
    List<LabReservation> queryLabReservationBlackList(LabReservation labReservation);

    List<LabReservation> selectReservationList(QueryEntity queryEntity);
}
